﻿using Sys.Bpm.api.model;
using Sys.Bpm.api.model.query;
using Sys.Workflow.Bpmn.Models;
using Sys.Workflow.Cloud.Services.Rest.Api.Resources;
using Sys.Workflow.Engine.Impl.Persistence.Entity;
using Sys.Workflow.Engine.Repository;
using Sys.Workflow.Hateoas;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Sys.Workflow.Cloud.Services.Rest.Api
{
    /// <summary>
    /// 流程定义元数据RestAPI
    /// </summary>
    public interface IProcessDefinitionMetaController
    {
        /// <summary>
        /// 读取流程定义元数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ProcessDefinitionMetaResource GetProcessDefinitionMetadata(string id);

        /// <summary>
        /// 创建新的流程定义模型
        /// </summary>
        /// <returns></returns>
        Task<IModel> NewModel();

        Task<Resources<IModel>> List(ModelQuery query);

        Task<object> GetModel(string id);

        HisProcessDefinitionMeta GetHisProcessDefinitionMetadata(string id);
    }
}